summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0ac3d254e..25703e9d5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -82,8 +82,9 @@ if (MSVC)
/wd4324 # 'struct_name': structure was padded due to __declspec(align())
)
- if (USE_CCACHE)
+ if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
# when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format
+ # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
add_compile_options(/Z7)
else()
add_compile_options(/Zi)
@@ -151,6 +152,10 @@ else()
endif()
endif()
+if (YUZU_USE_PRECOMPILED_HEADERS)
+ set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
+endif()
+
add_subdirectory(common)
add_subdirectory(core)
add_subdirectory(audio_core)